package indi.defoliation.unknownrpg.core;


import java.io.File;

import org.bukkit.plugin.java.JavaPlugin;

import indi.defoliation.unknownrpg.api.config.LoreYamlConfig;
import indi.defoliation.unknownrpg.core.listener.UnknownRPGListener;

public class UnknownRPG extends JavaPlugin{

	private static UnknownRPG plugin;
	private static UnknownRPGConfig CONFIG;

	public UnknownRPG(){
		plugin=this;
	}

	public void onEnable() {
		LoreYamlConfig.init(this);
		saveDefaultConfig();
		CONFIG = new UnknownRPGConfig(new File(getDataFolder(),"config.yml"));
		CONFIG.reload();
		this.getServer().getPluginManager().registerEvents(new UnknownRPGListener(this), this);
	}
	
	public static void sendMessage(String s) {
		plugin.getLogger().info(s);
	}
	
	public static UnknownRPG getInstance() {
		return plugin;
	}
}
